add multifield advection#13
Merged
Merged
Conversation
Member
Author
|
@copilot resolve the merge conflicts in this pull request |
…ersion to 0.0.4 Co-authored-by: Iddingsite <50744020+Iddingsite@users.noreply.github.com>
Contributor
Resolved in c154b87. The only conflict was in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Multi-field advection support
Summary
Adds the ability to advect multiple scalar fields sharing the same velocity in a single
WENO_step!call. Useful for problems involving multiple chemical components, tracers, or any set of fields transported by the same flow.Usage
Each field gets its own
u_min/u_maxbounds for the Zhang-Shu limiter. Fields are advected sequentially, reusing the internalfl,fr,du,utbuffers — no additional memory is allocated.Changes
New multi-field
WENO_step!overloads acceptingTuple{Vararg{...}}of arrays:time_stepping.jl— CPU 1Dtime_stepping.jl— CPU 2Dtime_stepping.jl— CPU 3DKAExt.jl— KernelAbstractions 1D/2D/3DChmyExt.jl— Chmy 1D/2D/3DTests:
test_multi_field.jl— equivalence tests verifying multi-fieldWENO_step!produces identical results to calling single-fieldWENO_step!individually (1D/2D/3D CPU + 1D KA CPU)Docs & examples:
README.md— added multi-field section with usage exampleGettingStarted.md— added multi-field documentation2D_multi_field.jl— example advecting 3 chemical componentsDesign decisions
Tuple{Vararg{...}}signature instead ofNTuple{NF, T}to avoidAqua.jlunbound type parameter warnings from keyword-args desugaring.u_min/u_maxasTuple{Vararg{Real}}— each field can have independent limiter bounds.Tests
All 172 tests pass (including 9 new multi-field tests and all 11 Aqua checks).